package com.probiz.estoresa.product.web.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.BindException;

import com.probiz.estore.common.model.product.ProductMedia;
import com.probiz.estore.core.controller.GenericStoreAdminController;
import com.probiz.estore.product.service.ProductMediaManager;

public class ProductMediaController extends GenericStoreAdminController<ProductMedia> {
    private ProductMediaManager productMediaManager = null;

    public void setProductMediaManager(ProductMediaManager inMgr) {
        this.productMediaManager = inMgr;
    }

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.GenericController#getEntityName(java.lang.Object)
	 */
	@Override
	protected String getEntityName(ProductMedia entity) {
		return entity.getProductMediaName();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.BaseController#initController()
	 */
	@Override
	protected void initController() throws Exception {
		mgr = productMediaManager;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.probiz.estore.core.controller.GenericController#preSave(javax.servlet.http.HttpServletRequest,
	 *      java.lang.Object, org.springframework.validation.BindException)
	 */
	@Override
	protected void preSave(HttpServletRequest request, ProductMedia entity, BindException errors) {
	}

}
